Welcome for Computer Graphics.
So on Monday, no, that's also wrong.
Sorry, I'm totally confused.
OK, let me start again.
OK, welcome for Computer Graphics.
So last week, we were speaking about occlusion.
And I told you about the set buffer, a very simple way
to generate occlusion.
And the general idea is that for every pixel in our image,
we store a depth value.
And whenever we rasterize something,
we interpolate depth for every pixel.
And then before we write a pixel,
we make a so-called z-test or set test
that tests whether the new pixel is
in front of the previously drawn geometry or maybe behind.
And if it's behind, then we did work, which was for nothing,
because we simply throw away the pixel.
But by this, we can achieve visibility.
We can achieve correct occlusion.
It's a very efficient algorithm.
And yeah, it works nicely and avoids all these problems
that we learned that, for instance, the painter algorithm
has where we try to sort triangles from back to front.
We can avoid all that with a set buffer.
There's one noticeable exception, which is transparency.
And this is what I want to speak about now
in the next five minutes before we
start with the next large section today about lighting.
The idea of transparency is that maybe we do not only
have objects that are opaque.
Opaque is just the opposite of transparent.
Opaque means that no light penetrates an object.
So usually, most objects that we have are opaque.
But sometimes, we also have transparent objects,
like glass objects or windows or stuff like that.
And maybe we also want to be able to handle these.
And in fact, at first sight, it's
not very difficult to do so.
And the technique that is applied in computer graphics
to handle transparency is so-called alpha blending.
And the idea is the following.
Oh, OK.
OK, now I need my nice pointer.
Where is it?
No, here we are.
OK, so the idea is to use so-called alpha blending.
And here, you can already see a result of alpha blending.
So you see that red circle obviously
is in front of the blue one.
Presenters
Zugänglich über
Offener Zugang
Dauer
01:26:10 Min
Aufnahmedatum
2019-11-11
Hochgeladen am
2019-11-18 12:59:03
Sprache
de-DE